package com.quanyan.stadium.enums.errorEnum;

/**
 * Created by xiaoxiao on 16/6/2.
 *
 * 记录积分报错
 */
public enum RecordScoreErrorEnum {


    RECORD_SCORE_LIST_ERROR_1(1,"101","比分和胜负关系不合法","比分和胜负关系不合法"),
    RECORD_SCORE_LIST_ERROR_2(2,"102","赛事已完结,无法操作", "赛事已完结,无法操作"),
    RECORD_SCORE_LIST_ERROR_3(3,"103","赛程不存在","赛程不存在"),
    RECORD_SCORE_LIST_ERROR_4(4,"104","当前栏目所在赛制,比分不能出现平", "当前栏目所在赛制,比分不能出现平"),
    RECORD_SCORE_LIST_ERROR_5(5,"105","赛程已经完结或赛程存在轮空,无法录入","赛程已经完结或赛程存在轮空,无法录入"),
    RECORD_SCORE_LIST_ERROR_6(6,"106","赛程积分已被管理员录入完毕","赛程积分已被管理员录入完毕"),
    RECORD_SCORE_LIST_ERROR_7(7,"107","用户不合法","用户不合法"),
    RECORD_SCORE_LIST_ERROR_8(8,"108","不能再次录入","不能再次录入"),
    RECORD_SCORE_LIST_ERROR_9(9,"109","未开始的比赛不能录入比赛结果","未开始的比赛不能录入比赛结果"),
    RECORD_SCORE_LIST_ERROR_10(10,"110","距离比赛开始时间超过三天不能录入比赛结果","距离比赛开始时间超过三天不能录入比赛结果"),
    RECORD_SCORE_LIST_ERROR_11(11,"111","比赛积分已经确认完成无法再次修改","比赛积分已经确认完成无法再次修改"),
    RECORD_SCORE_LIST_ERROR_12(12,"112","您的队友已经录入比分，您不能再录入","您的队友已经录入比分，您不能再录入"),
    RECORD_SCORE_LIST_ERROR_13(13,"113","不能输入平局比分","不能输入平局比分"),
    RECORD_SCORE_LIST_ERROR_14(14,"114","比分格式不准确","比分格式不准确");


    public static String getMsgById(int id){
        String msg = "未知错误";
        switch (id) {
            case 1:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_1.getLabel();
                break;
            case 2:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_2.getLabel();
                break;
            case 3:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_3.getLabel();
                break;
            case 4:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_4.getLabel();
                break;
            case 5:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_5.getLabel();
                break;
            case 6:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_6.getLabel();
                break;
            case 7:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_7.getLabel();
                break;
            case 8:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_8.getLabel();
                break;
            case 9:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_9.getLabel();
                break;
            case 10:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_10.getLabel();
                break;
            case 13:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_13.getLabel();
                break;
            case 14:
                msg = RecordScoreErrorEnum.RECORD_SCORE_LIST_ERROR_14.getLabel();
                break;
            default:
                break;
        }
        return msg;
    }

    RecordScoreErrorEnum(int id, String code, String name, String label) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.label = label;
    }

    private int id;

    private String code;

    private String name;

    private String label;

    public Integer getId() {
        return id;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String getLabel() {
        return label;
    }
}
